package Person.File;

import java.io.File;
import java.io.IOException;

public class FileDemo03 {
    public static void main(String[] args) throws IOException {
        File f = new File("d:\\exe.txt");
        if(f.exists()){
            f.delete();
        }else{
            System.out.println(f.createNewFile());
        }
        System.out.println("-----------------");
        File f2 = new File("d:\\exe");
       // System.out.println(f2.mkdir());
        System.out.println(f2.delete());
        System.out.println("-----------------");
    /*    File f3 = new File("d:\\exe");
        System.out.println(f3.mkdir());*/
        File f4 = new File("d:\\exe.txt");
        System.out.println(f4.createNewFile());
    }
}
